cmake_minimum_required(VERSION 3.0)
project(Zeus)

# Compile arguments
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wno-format-security -Wno-unused-result")

# Check compiler flag
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)

if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

# Executable files output path
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

# Header file include path
include_directories(${PROJECT_SOURCE_DIR}/../net)
include_directories(${PROJECT_SOURCE_DIR}/../utils)

# Add subdirectory
add_subdirectory(client)
add_subdirectory(server)

